﻿using SqlSugar;
using System.ComponentModel.DataAnnotations;

namespace Koala.Pro.Core.Models;

[SugarTable("T_ACL_Menu")]
public class MenuInfo : Entity<string>
{
    public virtual string PID { get; set; }

    public virtual string Name { get; set; }

    public virtual string Icon { get; set; }

    public virtual string Seq { get; set; }

    public virtual string FunctionId { get; set; }

    public virtual int? Visible { get; set; } = 1;

    public virtual int? Expand { get; set; } = 0;

    public virtual string WinformType { get; set; }

    public virtual string WpfType { get; set; }

    public virtual string Url { get; set; }

    public virtual string WebIcon { get; set; }

    [Required]
    public virtual string SystemType_ID { get; set; }

    public virtual string Creator { get; set; }

    public virtual string Creator_ID { get; set; }

    public virtual DateTime? CreateTime { get; set; }

    public virtual string Editor { get; set; }

    public virtual string Editor_ID { get; set; }

    public virtual DateTime? EditTime { get; set; }

    public virtual int? Deleted { get; set; } = 0;

    public virtual byte[] EmbedIcon { get; set; }

    public virtual string Tag { get; set; }

    [SugarColumn(IsIgnore = true)]
    public List<MenuInfo> Children { get; set; } = new List<MenuInfo>();

    public MenuInfo()
    {
        PID = "-1";
        Visible = 1;
        CreateTime = DateTime.Now;
        EditTime = DateTime.Now;
    }
}

